package com.woniu.service.impl;

import com.woniu.dao.DynamicCommentMapper;
import com.woniu.dto.DynamicCommentDTO;
import com.woniu.service.DynamicCommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DynamicCommentServiceImpl implements DynamicCommentService {

    @Autowired
    private DynamicCommentMapper dc_mapper;

    @Override
    public List<DynamicCommentDTO> findByPage(Integer currentPage, Integer pageSize) {
        List<DynamicCommentDTO> list = dc_mapper.findByPage(currentPage,pageSize);
        return list;
    }

    @Override
    public void delComment(Integer id) {
        dc_mapper.delComment(id);
    }

    @Override
    public List<DynamicCommentDTO> select(String nickName,Integer dynamicType) {
        List<DynamicCommentDTO> list=dc_mapper.select(nickName,dynamicType);
        return list;
    }
}
